package com.xm.xmapp.dialog;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.xm.xmapp.R;

public class PileTipDialog extends Dialog {

	private String text;

	public PileTipDialog(Activity context, String text) {
		super(context, R.style.Dialog);
		this.text = text;
	}

	@SuppressLint("InflateParams")
	public void init() {
		LayoutInflater inflater = LayoutInflater.from(getContext());
		View view = inflater.inflate(R.layout.dialog_pile_tip, null);
		setContentView(view);
		view.findViewById(R.id.dissmiss).setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				dismiss();

			}
		});
		TextView t = (TextView) view.findViewById(R.id.text);
		t.setText(text);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		init();

	}

}
